<?php

/**
 * A base class for creating URI components
 *
 * @todo Encoding should be planned for 
 */
abstract class JSCasts_URI_Component_Abstract
implements JSCasts_URI_Component_Interface
{
    /**
     * A combined setter and getter
     *
     * @param string $property
     * @param mixed $value
     * @return mixed
     */
	protected function setAndReturn($property, $value = null)
	{
		if ($value !== null) {
			$this->{$property} = $value;
		}
		
		return $this->{$property};
	}
}